package compte_bancaire;

public class CompteEpargne {
	
	private final double plafond;
	private double solde;
	private String nom;
	private double numero;
	private final double minimumCredit;
	private final double VersementMinimum;
	private double tauxRemuneration;
	
	
	
	
	
	public CompteEpargne(double plafond, double solde, String nom,
			double numero, double minimumCredit, double versementMinimum,
			double tauxRemuneration) {
		super();
		this.plafond = plafond;
		this.solde = solde;
		this.nom = nom;
		this.numero = numero;
		this.minimumCredit = minimumCredit;
		VersementMinimum = versementMinimum;
		this.tauxRemuneration = tauxRemuneration;
	}

	
	

	public double getSolde() {
		return solde;
	}




	public void setSolde(double solde) {
		this.solde = solde;
	}




	public String getNom() {
		return nom;
	}




	public void setNom(String nom) {
		this.nom = nom;
	}




	public double getNumero() {
		return numero;
	}




	public void setNumero(double numero) {
		this.numero = numero;
	}




	public double getTauxRemuneration() {
		return tauxRemuneration;
	}




	public void setTauxRemuneration(double tauxRemuneration) {
		this.tauxRemuneration = tauxRemuneration;
	}




	public double getPlafond() {
		return plafond;
	}




	public double getMinimumCredit() {
		return minimumCredit;
	}




	public double getVersementMinimum() {
		return VersementMinimum;
	}




	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(VersementMinimum);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(minimumCredit);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + ((nom == null) ? 0 : nom.hashCode());
		temp = Double.doubleToLongBits(numero);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(plafond);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(solde);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(tauxRemuneration);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		return result;
	}
	
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CompteEpargne other = (CompteEpargne) obj;
		if (Double.doubleToLongBits(VersementMinimum) != Double
				.doubleToLongBits(other.VersementMinimum))
			return false;
		if (Double.doubleToLongBits(minimumCredit) != Double
				.doubleToLongBits(other.minimumCredit))
			return false;
		if (nom == null) {
			if (other.nom != null)
				return false;
		} else if (!nom.equals(other.nom))
			return false;
		if (Double.doubleToLongBits(numero) != Double
				.doubleToLongBits(other.numero))
			return false;
		if (Double.doubleToLongBits(plafond) != Double
				.doubleToLongBits(other.plafond))
			return false;
		if (Double.doubleToLongBits(solde) != Double
				.doubleToLongBits(other.solde))
			return false;
		if (Double.doubleToLongBits(tauxRemuneration) != Double
				.doubleToLongBits(other.tauxRemuneration))
			return false;
		return true;
	}
	
	@Override
	public String toString() {
		return "CompteEpargne [plafond=" + plafond + ", solde=" + solde
				+ ", nom=" + nom + ", numero=" + numero + ", minimumCredit="
				+ minimumCredit + ", VersementMinimum=" + VersementMinimum
				+ ", tauxRemuneration=" + tauxRemuneration + "]";
	}

}